function MyGrid(name,par){
	
	
	var settings = { 
		mtype:"POST",
		datatype: "json",
		jsonReader: { userdata: "userdata",repeatitems : false, id: "0" }, 
		prmNames: {page:"_page",rows:"_rows", sort: "_sidx",order: "_sord", search:"_search", nd:"_nd",oper:"_oper", npage:null},
		viewrecords:true,
		multiselect: false,
		rowNum:10,
		rowList:[10,20,30]

	};

    jQuery.extend(settings, par); 
	jQuery(function() {
		jQuery( "button, input:button, a", ".demo" ).button();
		//jQuery( "a", ".demo" ).click(function() { return false; });
	});
	return jQuery(name).jqGrid(settings);

}